import Vue from 'vue'
import Router from 'vue-router'
// 过渡页面
import LoadingTransferView from '../views/loading.transfer.view.vue'
// 彭大帅VR游戏模板
const thirdActivityView = () => import(/* webpackChunkName: "seldom-view" */ '../views/Vr/third/third-activity-view');
const thirdActivityV1View = () => import(/* webpackChunkName: "seldom-view" */ '../views/Vr/third/third-activity-view-v1.0');
const thirdHelpView = () => import(/* webpackChunkName: "seldom-view" */ '../views/Vr/third/third-help-view');
const thirdRuleView = () => import(/* webpackChunkName: "seldom-view" */ '../views/Vr/third/third-rule-view');
// 拼图
import roleHomePage from '../views/figure/role-home-page.vue'
import roleFigureView from '../views/figure/role-figure-view.vue'
import roleRuleView from '../views/figure/role-rule-view.vue'
// demo
import rollingPage from '../views/demo/rolling.page.vue'
import ZTFRollingPage from '../views/demo/ztf.rolling.page.vue'
import phoneCopyView from '../views/smallFeature/phone.copy.view.vue'
Vue.use(Router);
export default class router {
  /**
   *  设置路由
   *  key= 路由名字 value=路由详细设置
   * @returns 返回路由列表
   */
  static routeMap() {
    return {
      // 过渡页面
      LoadingTransferView: {
        path: '/',
        component: LoadingTransferView
      },
      // 彭大帅VR游戏模板
      thirdActivity: {
        path: '/thirdActivity',
        component: thirdActivityView
      },
      thirdActivityV1: {
        path: '/thirdActivityV1',
        component: thirdActivityV1View
      },
      thirdHelpView: {
        path: '/thirdHelp',
        component: thirdHelpView
      },
      thirdRuleView: {
        path: '/thirdRule',
        component: thirdRuleView
      },
      roleHomePage: {
        path: '/roleHome',
        component: roleHomePage
      },
      roleFigureView: {
        path: '/roleFigure',
        component: roleFigureView
      },
      roleRuleView: {
        path: '/roleRule',
        component: roleRuleView
      },
      rollingPage: {
        path: '/rolling',
        component: rollingPage
      },
      ZTFRollingPage: {
        path: '/ZTFRolling',
        component: ZTFRollingPage
      },
      phoneCopyView: {
        path: '/phoneCopy',
        component: phoneCopyView
      }
    };
  }

  static routes() {
    let routes = [];
    let routeMap = this.routeMap();
    for (let route in routeMap) {
      if (routeMap.hasOwnProperty('hook')) {

      }
      if (routeMap.hasOwnProperty(route)) {
        routes.push({name: route, ...routeMap[route]});
      }
    }
    return routes;
  }

  static router() {
    return new Router({
      routes: this.routes()
    });
  }
}

export const sss = 100;
